<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Generating function (physics)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Generating_function_(physics)"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.math.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Generating_function_physics rootpage-Generating_function_physics skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Generating function (physics)</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */
.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}
/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">This article is about generating functions in physics. For generating functions in mathematics, see <a href="Generating_function" title="Generating function">Generating function</a>.</div>
<p>In physics, and more specifically in <a href="Hamiltonian_mechanics" title="Hamiltonian mechanics">Hamiltonian mechanics</a>, a <b>generating function</b> is, loosely, a function whose partial derivatives generate the differential equations that determine a system's dynamics. Common examples are the <a href="Partition_function_(statistical_mechanics)" title="Partition function (statistical mechanics)">partition function</a> of <a href="Statistical_mechanics" title="Statistical mechanics">statistical mechanics</a>, the Hamiltonian, and the function which acts as a bridge between two sets of canonical variables when performing a <a href="Canonical_transformation" title="Canonical transformation">canonical transformation</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="In_canonical_transformations">In canonical transformations</h2></div>
<p>There are four basic generating functions, summarized by the following table:<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<table class="wikitable" style="margin-left:1.5em;">
<tbody><tr>
<th style="background:#ffdead;">Generating function
</th>
<th style="background:#ffdead;">Its derivatives
</th></tr>
<tr>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F=F_{1}(q,Q,t)}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>F</mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>q</mi>
<mo>,</mo>
<mi>Q</mi>
<mo>,</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle F=F_{1}(q,Q,t)}</annotation>
</semantics>
</math></span><img src="./011d2eed1670abc0e08573555306930dfcedcf74.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -0.838ex; width:15.013ex; height:2.843ex;" alt="{\displaystyle F=F_{1}(q,Q,t)}" loading="lazy"></span>
</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p=~~{\frac {\partial F_{1}}{\partial q}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
<mo>=</mo>
<mtext> </mtext>
<mtext> </mtext>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>q</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p=~~{\frac {\partial F_{1}}{\partial q}}\,\!}</annotation>
</semantics>
</math></span><img src="./deaecd12a10db862a25ed8823d1c2918b7a88194.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; margin-right: -0.387ex; width:10.609ex; height:5.843ex;" alt="{\displaystyle p=~~{\frac {\partial F_{1}}{\partial q}}\,\!}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P=-{\frac {\partial F_{1}}{\partial Q}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>Q</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P=-{\frac {\partial F_{1}}{\partial Q}}\,\!}</annotation>
</semantics>
</math></span><img src="./9bd334b53cdcb9d25ed16bd6685d36c3d7e0dd4c.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-right: -0.387ex; width:11.742ex; height:5.843ex;" alt="{\displaystyle P=-{\frac {\partial F_{1}}{\partial Q}}\,\!}" loading="lazy"></span>
</td></tr>
<tr>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}F&=F_{2}(q,P,t)\\&=F_{1}+QP\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>F</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>q</mi>
<mo>,</mo>
<mi>P</mi>
<mo>,</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>+</mo>
<mi>Q</mi>
<mi>P</mi>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}F&=F_{2}(q,P,t)\\&=F_{1}+QP\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./1237f4831eacdeec93115af598fb2a363aa7d68e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:15.671ex; height:5.843ex;" alt="{\displaystyle {\begin{aligned}F&=F_{2}(q,P,t)\\&=F_{1}+QP\end{aligned}}}" loading="lazy"></span>
</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle p=~~{\frac {\partial F_{2}}{\partial q}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>p</mi>
<mo>=</mo>
<mtext> </mtext>
<mtext> </mtext>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>q</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle p=~~{\frac {\partial F_{2}}{\partial q}}\,\!}</annotation>
</semantics>
</math></span><img src="./f3606411815a8c608e8b85f1158af15b4d856831.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-left: -0.089ex; margin-right: -0.387ex; width:10.609ex; height:5.843ex;" alt="{\displaystyle p=~~{\frac {\partial F_{2}}{\partial q}}\,\!}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q=~~{\frac {\partial F_{2}}{\partial P}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Q</mi>
<mo>=</mo>
<mtext> </mtext>
<mtext> </mtext>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>P</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q=~~{\frac {\partial F_{2}}{\partial P}}\,\!}</annotation>
</semantics>
</math></span><img src="./3ef44186b4dc5815dabc8ca0c861a8aa503816fe.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; margin-right: -0.387ex; width:11.188ex; height:5.509ex;" alt="{\displaystyle Q=~~{\frac {\partial F_{2}}{\partial P}}\,\!}" loading="lazy"></span>
</td></tr>
<tr>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}F&=F_{3}(p,Q,t)\\&=F_{1}-qp\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>F</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>,</mo>
<mi>Q</mi>
<mo>,</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>−<!-- − --></mo>
<mi>q</mi>
<mi>p</mi>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}F&=F_{3}(p,Q,t)\\&=F_{1}-qp\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./e3896e0eaaf89c50d5d523d7708a769056dae2e1.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:15.864ex; height:5.843ex;" alt="{\displaystyle {\begin{aligned}F&=F_{3}(p,Q,t)\\&=F_{1}-qp\end{aligned}}}" loading="lazy"></span>
</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=-{\frac {\partial F_{3}}{\partial p}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>p</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q=-{\frac {\partial F_{3}}{\partial p}}\,\!}</annotation>
</semantics>
</math></span><img src="./1cd5605c1b5827143029a3181b00974a399a83d0.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-right: -0.387ex; width:11.066ex; height:5.843ex;" alt="{\displaystyle q=-{\frac {\partial F_{3}}{\partial p}}\,\!}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P=-{\frac {\partial F_{3}}{\partial Q}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>Q</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P=-{\frac {\partial F_{3}}{\partial Q}}\,\!}</annotation>
</semantics>
</math></span><img src="./06eb2c92184666b12c2addfaaf4098fcef1c163e.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-right: -0.387ex; width:11.742ex; height:5.843ex;" alt="{\displaystyle P=-{\frac {\partial F_{3}}{\partial Q}}\,\!}" loading="lazy"></span>
</td></tr>
<tr>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\begin{aligned}F&=F_{4}(p,P,t)\\&=F_{1}-qp+QP\end{aligned}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mtable columnalign="right left right left right left right left right left right left" rowspacing="3pt" columnspacing="0em 2em 0em 2em 0em 2em 0em 2em 0em 2em 0em" displaystyle="true">
<mtr>
<mtd>
<mi>F</mi>
</mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>,</mo>
<mi>P</mi>
<mo>,</mo>
<mi>t</mi>
<mo stretchy="false">)</mo>
</mtd>
</mtr>
<mtr>
<mtd></mtd>
<mtd>
<mi></mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>1</mn>
</mrow>
</msub>
<mo>−<!-- − --></mo>
<mi>q</mi>
<mi>p</mi>
<mo>+</mo>
<mi>Q</mi>
<mi>P</mi>
</mtd>
</mtr>
</mtable>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\begin{aligned}F&=F_{4}(p,P,t)\\&=F_{1}-qp+QP\end{aligned}}}</annotation>
</semantics>
</math></span><img src="./761f7ba024f1b72ebf62cd9bdfe5cf6e2dd374f4.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:19.643ex; height:5.843ex;" alt="{\displaystyle {\begin{aligned}F&=F_{4}(p,P,t)\\&=F_{1}-qp+QP\end{aligned}}}" loading="lazy"></span>
</td>
<td><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=-{\frac {\partial F_{4}}{\partial p}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>p</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q=-{\frac {\partial F_{4}}{\partial p}}\,\!}</annotation>
</semantics>
</math></span><img src="./4dd245a42d50d525b59b0a697c035b4026e45712.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; margin-right: -0.387ex; width:11.066ex; height:5.843ex;" alt="{\displaystyle q=-{\frac {\partial F_{4}}{\partial p}}\,\!}" loading="lazy"></span> and <span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle Q=~~{\frac {\partial F_{4}}{\partial P}}\,\!}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>Q</mi>
<mo>=</mo>
<mtext> </mtext>
<mtext> </mtext>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>P</mi>
</mrow>
</mfrac>
</mrow>
<mspace width="thinmathspace"></mspace>
<mspace width="negativethinmathspace"></mspace>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle Q=~~{\frac {\partial F_{4}}{\partial P}}\,\!}</annotation>
</semantics>
</math></span><img src="./961f7453d2f66ca8c0f1e20a8b7ddf8d13cea994.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.005ex; margin-right: -0.387ex; width:11.188ex; height:5.509ex;" alt="{\displaystyle Q=~~{\frac {\partial F_{4}}{\partial P}}\,\!}" loading="lazy"></span>
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="Example">Example</h2></div>
<p>Sometimes a given Hamiltonian can be turned into one that looks like the <a href="Harmonic_oscillator" title="Harmonic oscillator">harmonic oscillator</a> Hamiltonian, which is
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H=aP^{2}+bQ^{2}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>H</mi>
<mo>=</mo>
<mi>a</mi>
<msup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>+</mo>
<mi>b</mi>
<msup>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle H=aP^{2}+bQ^{2}.}</annotation>
</semantics>
</math></span></span>
</p><p>For example, with the Hamiltonian
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H={\frac {1}{2q^{2}}}+{\frac {p^{2}q^{4}}{2}},}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>H</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mn>1</mn>
<mrow>
<mn>2</mn>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mrow>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<msup>
<mi>p</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>4</mn>
</mrow>
</msup>
</mrow>
<mn>2</mn>
</mfrac>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle H={\frac {1}{2q^{2}}}+{\frac {p^{2}q^{4}}{2}},}</annotation>
</semantics>
</math></span></span>
</p><p>where <span class="texhtml mvar" style="font-style:italic;">p</span> is the generalized momentum and <span class="texhtml mvar" style="font-style:italic;">q</span> is the <a href="Generalized_coordinates" title="Generalized coordinates">generalized coordinate</a>, a good canonical transformation to choose would be
</p>
<style data-mw-deduplicate="TemplateStyles:r1266403038">
/* start https://en.wikipedia.org/ */
.mw-parser-output table.numblk{border-collapse:collapse;border:none;margin-top:0;margin-right:0;margin-bottom:0}.mw-parser-output table.numblk>tbody>tr>td{vertical-align:middle;padding:0}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2){width:99%}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table{border-collapse:collapse;margin:0;border:none;width:100%}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:first-child,.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:last-child{padding:0 0.4ex}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td:nth-child(2){width:100%;padding:0}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{padding:0}.mw-parser-output table.numblk>tbody>tr>td:last-child{font-weight:bold}.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child{font-weight:unset}.mw-parser-output table.numblk>tbody>tr>td:last-child::before{content:"("}.mw-parser-output table.numblk>tbody>tr>td:last-child::after{content:")"}.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child::before,.mw-parser-output table.numblk.numblk-raw-n>tbody>tr>td:last-child::after{content:none}.mw-parser-output table.numblk>tbody>tr>td{border:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td{border:thin solid}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td{border:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td:nth-child(2)>table>tbody>tr:first-child>td{border:thin solid}.mw-parser-output table.numblk>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{border-left:none;border-right:none;border-bottom:none}.mw-parser-output table.numblk.numblk-border>tbody>tr>td:nth-child(2)>table>tbody>tr:last-child>td{border-left:thin solid;border-right:thin solid;border-bottom:thin solid}.mw-parser-output table.numblk:target{color:var(--color-base,#202122);background-color:#cfe8fd}@media screen{html.skin-theme-clientpref-night .mw-parser-output table.numblk:target{color:var(--color-base,#eaecf0);background-color:#301702}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output table.numblk:target{color:var(--color-base,#eaecf0);background-color:#301702}}
/* end https://en.wikipedia.org/ */
</style><table role="presentation" class="numblk" style="margin-left: 0em;"><tbody><tr><td class="nowrap"><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P=pq^{2}{\text{ and }}Q={\frac {-1}{q}}.}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo>=</mo>
<mi>p</mi>
<msup>
<mi>q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mrow class="MJX-TeXAtom-ORD">
<mtext> and </mtext>
</mrow>
<mi>Q</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mi>q</mi>
</mfrac>
</mrow>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P=pq^{2}{\text{ and }}Q={\frac {-1}{q}}.}</annotation>
</semantics>
</math></span></span></td> <td></td> <td class="nowrap"><span id="math_1" class="reference nourlexpansion" style="font-weight:bold;">1</span></td></tr></tbody></table>
<p>This turns the Hamiltonian into
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle H={\frac {Q^{2}}{2}}+{\frac {P^{2}}{2}},}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>H</mi>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msup>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mn>2</mn>
</mfrac>
</mrow>
<mo>+</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<msup>
<mi>P</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
<mn>2</mn>
</mfrac>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle H={\frac {Q^{2}}{2}}+{\frac {P^{2}}{2}},}</annotation>
</semantics>
</math></span></span>
</p><p>which is in the form of the harmonic oscillator Hamiltonian.
</p><p>The generating function <span class="texhtml"><i>F</i></span> for this transformation is of the third kind,
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F=F_{3}(p,Q).}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>F</mi>
<mo>=</mo>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>,</mo>
<mi>Q</mi>
<mo stretchy="false">)</mo>
<mo>.</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle F=F_{3}(p,Q).}</annotation>
</semantics>
</math></span></span>
</p><p>To find <span class="texhtml"><i>F</i></span> explicitly, use the equation for its derivative from the table above,
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle P=-{\frac {\partial F_{3}}{\partial Q}},}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>P</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>Q</mi>
</mrow>
</mfrac>
</mrow>
<mo>,</mo>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle P=-{\frac {\partial F_{3}}{\partial Q}},}</annotation>
</semantics>
</math></span></span>
</p><p>and substitute the expression for <span class="texhtml mvar" style="font-style:italic;">P</span> from equation (<b><a href="#math_1">1</a></b>), expressed in terms of <span class="texhtml mvar" style="font-style:italic;">p</span> and <span class="texhtml mvar" style="font-style:italic;">Q</span>:
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle {\frac {p}{Q^{2}}}=-{\frac {\partial F_{3}}{\partial Q}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>p</mi>
<msup>
<mi>Q</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>2</mn>
</mrow>
</msup>
</mfrac>
</mrow>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>Q</mi>
</mrow>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle {\frac {p}{Q^{2}}}=-{\frac {\partial F_{3}}{\partial Q}}}</annotation>
</semantics>
</math></span></span>
</p><p>Integrating this with respect to <span class="texhtml mvar" style="font-style:italic;">Q</span> results in an equation for the generating function of the transformation given by equation (<b><a href="#math_1">1</a></b>):
</p>
<div class="equation-box" style="margin: 0 0 0 1.6em;padding: 5px; border-width:2px; border-style: solid; border-color: var(--color-success,#14866d); color: inherit;text-align: center; display: table">
<p><span class="mwe-math-element mwe-math-element-inline"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle F_{3}(p,Q)={\frac {p}{Q}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
<mo stretchy="false">(</mo>
<mi>p</mi>
<mo>,</mo>
<mi>Q</mi>
<mo stretchy="false">)</mo>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mi>p</mi>
<mi>Q</mi>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle F_{3}(p,Q)={\frac {p}{Q}}}</annotation>
</semantics>
</math></span><img src="./2a2cccdca0944a83f2d84e214cde92911d237cf8.svg" class="mwe-math-fallback-image-inline mw-invert skin-invert" aria-hidden="true" style="vertical-align: -2.338ex; width:14.173ex; height:5.343ex;" alt="{\displaystyle F_{3}(p,Q)={\frac {p}{Q}}}" loading="lazy"></span>
</p>
</div>
<p>To confirm that this is the correct generating function, verify that it matches (<b><a href="#math_1">1</a></b>):
</p><p><span class="mwe-math-element mwe-math-element-block"><span class="mwe-math-mathml-display mwe-math-mathml-a11y" style="display: none;"><math display="block" xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle q=-{\frac {\partial F_{3}}{\partial p}}={\frac {-1}{Q}}}">
<semantics>
<mrow class="MJX-TeXAtom-ORD">
<mstyle displaystyle="true" scriptlevel="0">
<mi>q</mi>
<mo>=</mo>
<mo>−<!-- − --></mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<msub>
<mi>F</mi>
<mrow class="MJX-TeXAtom-ORD">
<mn>3</mn>
</mrow>
</msub>
</mrow>
<mrow>
<mi mathvariant="normal">∂<!-- ∂ --></mi>
<mi>p</mi>
</mrow>
</mfrac>
</mrow>
<mo>=</mo>
<mrow class="MJX-TeXAtom-ORD">
<mfrac>
<mrow>
<mo>−<!-- − --></mo>
<mn>1</mn>
</mrow>
<mi>Q</mi>
</mfrac>
</mrow>
</mstyle>
</mrow>
<annotation encoding="application/x-tex">{\displaystyle q=-{\frac {\partial F_{3}}{\partial p}}={\frac {-1}{Q}}}</annotation>
</semantics>
</math></span></span>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Hamilton%E2%80%93Jacobi_equation" title="Hamilton–Jacobi equation">Hamilton–Jacobi equation</a></li>
<li><a href="Poisson_bracket" title="Poisson bracket">Poisson bracket</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */
.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}
/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */
.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}
/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFGoldsteinPooleSafko2001" class="citation book cs1">Goldstein, Herbert; Poole, C. P.; Safko, J. L. (2001). <i>Classical Mechanics</i> (3rd ed.). Addison-Wesley. p. 373. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a> <bdi>978-0-201-65702-9</bdi>.</cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-05-23" href="https://en.wikipedia.org/wiki/?title=Generating_function_(physics)&oldid=1291809955">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>
</body></html>